home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_hideshackstuff.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  168 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_hideshackstuff.cog
  4. #    
  5. # Hide stuff in shack (or shack itself) when Indy isn't around to see it
  6. #
  7. # [RKD]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. message    startup
  14. message    entered
  15. message    exited
  16. message    killed
  17.  
  18. # things to hide only at startup
  19. thing    chain        nolink
  20. thing    bucket        nolink
  21. thing    shacknohole    nolink
  22.  
  23. # things to hide from a few faraway sectors
  24. thing    shack        nolink
  25. thing    shackwindow    nolink
  26. thing    sign        nolink
  27.  
  28. # things to hide anytime
  29. thing    box5        nolink
  30. thing    box6        nolink
  31. thing    box7        nolink
  32. thing    box8        nolink
  33. thing    box9        nolink
  34.  
  35. # things to hide that may get destroyed
  36. thing    dynamite1
  37. thing    dynamite2    nolink
  38. thing    dynamite3    nolink
  39. thing    box2        nolink
  40. thing    box3        nolink
  41. thing    box4        nolink
  42.  
  43. sector    hidesector    linkid=1
  44.  
  45. sector    triggeron1    linkid=1
  46. sector    triggeron2    linkid=1
  47.  
  48. sector    triggeroff1    linkid=2
  49. sector    triggeroff2    linkid=2
  50. sector    triggeroff3    linkid=2
  51. sector    triggeroff4    linkid=2
  52.  
  53. # these hide the shack when entered, show it when exited
  54. sector    shacktrigger1    linkid=3
  55. sector    shacktrigger2    linkid=3
  56. sector    shacktrigger3    linkid=3
  57. sector    shacktrigger4    linkid=3
  58. sector    shacktrigger5    linkid=3
  59. sector    shacktrigger6    linkid=3
  60. sector    shacktrigger7    linkid=3
  61. sector    shacktrigger8    linkid=3
  62.  
  63. # subroutine
  64. flex    hidethings=0.0    local
  65. flex    showthings=0.0    local
  66. end
  67.  
  68. code
  69. startup:
  70.     sleep(.01);
  71.     SetThingFlags(shack, 0x10);
  72.     SetThingFlags(sign, 0x10);
  73.     SetThingFlags(chain, 0x10);
  74.     SetThingFlags(bucket, 0x10);
  75.     SetThingFlags(shacknohole, 0x10);
  76.     SetThingFlags(shackwindow, 0x10);
  77.  
  78.     call hidethings;
  79.  
  80.     # when opening cutscene is done, show the big shack stuff again
  81.     sleep(50);
  82.     ClearThingFlags(shack, 0x10);
  83.     ClearThingFlags(sign, 0x10);
  84.     ClearThingFlags(chain, 0x10);
  85.     ClearThingFlags(bucket, 0x10);
  86.     ClearThingFlags(shacknohole, 0x10);
  87.     ClearThingFlags(shackwindow, 0x10);
  88.  
  89.     return;
  90.  
  91. entered:
  92. # ---> triggeron, triggeroff sectors, and hidesector
  93.     
  94.     if (GetSenderID() == 1)
  95.     {
  96.         call showthings;
  97.     }
  98.     else if (GetSenderID() == 2)
  99.     {
  100.         call hidethings;
  101.     }
  102.     else if (GetSenderID() == 3)
  103.     {
  104.         SetThingFlags(shack, 0x10);
  105.         SetThingFlags(shackwindow, 0x10);
  106.         SetThingFlags(sign, 0x10);
  107.     }
  108.  
  109.     return;
  110.  
  111. exited:
  112. # ---> shack triggers only    
  113.     if (GetSenderID() != 3) return;
  114.  
  115.     ClearThingFlags(shack, 0x10);
  116.     ClearThingFlags(shackwindow, 0x10);
  117.     ClearThingFlags(sign, 0x10);
  118.     return;
  119.  
  120. killed:
  121. # ---> dynamite
  122.     dynamite1 = -1;
  123.     return;
  124.  
  125. showthings:
  126.     # make these boxes visible
  127.     ClearThingFlags(box5, 0x10);
  128.     ClearThingFlags(box6, 0x10);
  129.     ClearThingFlags(box7, 0x10);
  130.     ClearThingFlags(box8, 0x10);
  131.     ClearThingFlags(box9, 0x10);
  132.  
  133.     # if dynamite hasn't blown, show these things too
  134.     if (dynamite1 != -1)
  135.     {
  136.         ClearThingFlags(box2, 0x10);
  137.         ClearThingFlags(box3, 0x10);
  138.         ClearThingFlags(box4, 0x10);
  139.         ClearThingFlags(dynamite1, 0x10);
  140.         ClearThingFlags(dynamite2, 0x10);
  141.         ClearThingFlags(dynamite3, 0x10);
  142.     }
  143.  
  144.     return;
  145.  
  146. hidethings:
  147.     # make these boxes invisible
  148.     SetThingFlags(box5, 0x10);
  149.     SetThingFlags(box6, 0x10);
  150.     SetThingFlags(box7, 0x10);
  151.     SetThingFlags(box8, 0x10);
  152.     SetThingFlags(box9, 0x10);
  153.  
  154.     # if dynamite hasn't blown, hide these things too
  155.     if (dynamite1 != -1)
  156.     {
  157.         SetThingFlags(box2, 0x10);
  158.         SetThingFlags(box3, 0x10);
  159.         SetThingFlags(box4, 0x10);
  160.         SetThingFlags(dynamite1, 0x10);
  161.         SetThingFlags(dynamite2, 0x10);
  162.         SetThingFlags(dynamite3, 0x10);
  163.     }
  164.  
  165.     return;
  166.  
  167. end
  168.